< previous page page_297 next page >

Page 297
8160-0297a.gif
Figure 14.7
Displaying the record count.
9f31265bb40b592b1929e18a47ab28e5.gif
NOTE
Depending on the OLE DB provider youre using, the data control might report the total number of rows right back to you or sometimes it might require you to go to the last row. To be safe, always go to the last row.
EXERCISE
Change the Form_Load() Event
1. Double-click the form and go to the Form_Load() event.
2. Add code to have this event to move to the last row in the recordset.
3. Add another line of code to have the data control come back to the first row in the recordset:
Private Sub Form_Load()
Debug.Print "Form_Load()"
mnuVToolbar.Enabled = False
mnuVStatus.Enabled = False

datEmployees.Recordset.MoveLast
datEmployees.Recordset.MoveFirst
End Sub

 
< previous page page_297 next page >

If you like this book, buy it!